<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!doctype html>
<html lang="en">
  <head>
    
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="网络程序设计(苏航)-期末作业">
    <meta name="author" content="赵云雷">
    <meta name="student number" content="18061119">
    <title>云雷书店</title>


    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" ></script>


    <style>
      .bd-placeholder-img {
        font-size: 1.125rem;
        text-anchor: middle;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
      }

      @media (min-width: 768px) {
        .bd-placeholder-img-lg {
          font-size: 3.5rem;
        }
      }
    </style>

    
    <!-- Custom styles for this template -->
    <link href="jumbotron.css" rel="stylesheet">
  </head>
  <body>
    <%@ include file="tabBar.jsp"%>
    <div class="jumbotron">
        <div class="container">
            <div class="card-deck mb-3 text-center">
                <div class="card mb-4 shadow-sm">
                    <div class="card-header">
                        <% ArrayList<String> detail = (ArrayList)session.getAttribute("detail");%>
                        <h4 class="my-0 font-weight-normal"><%=detail.get(1)%></h4>
                    </div>
                    <div class="card-body">
                        <h1 class="card-title pricing-card-title">￥<%=detail.get(3)%><small class="text-muted"></small></h1>
                        <ul class="list-unstyled mt-3 mb-4">
                            <li>书籍剩余：<%=detail.get(2)%></li>
                            <li>一些书籍的描述</li>
                            <li>推销语</li>
                            <li>广告</li>
                        </ul>
                        <form method="post" action="control?page=directory&submit=again">
                            <div class="mb-3">
                                <label for="address">购买数量</label>
                                <input type="text" class="form-control" name="buyCount" placeholder="请不要大于库存容量" required>
                            </div>
                            <input type="hidden" name="bookID" value="<%=detail.get(0)%>">
                            <input type="hidden" name="maxCount" value="<%=detail.get(2)%>">
                            <button type="submit" class="btn btn-lg btn-block btn-primary">加入购物车</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
  </body>
</html>
